<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>添加分类</title>
<link rel="stylesheet" type="text/css"
	href="__PUBLIC__/skin/admin/css/base.css">
<script language="javascript">
function viewArc(aid){
	if(aid==0) aid = getOneItem();
	window.open("archives.asp?aid="+aid+"&action=viewArchives");
}
function editArc(aid){
	if(aid==0) aid = getOneItem();
	location="archives.asp?aid="+aid+"&action=editArchives";
}
function updateArc(aid){
	var qstr=getCheckboxItem();
	if(aid==0) aid = getOneItem();
	location="archives.asp?aid="+aid+"&action=makeArchives&qstr="+qstr+"";
}
function checkArc(aid){
	var qstr=getCheckboxItem();
	if(aid==0) aid = getOneItem();
	location="archives.asp?aid="+aid+"&action=checkArchives&qstr="+qstr+"";
}
function moveArc(aid){
	var qstr=getCheckboxItem();
	if(aid==0) aid = getOneItem();
	location="archives.asp?aid="+aid+"&action=moveArchives&qstr="+qstr+"";
}
function adArc(aid){
	var qstr=getCheckboxItem();
	if(aid==0) aid = getOneItem();
	location="archives.asp?aid="+aid+"&action=commendArchives&qstr="+qstr+"";
}
function delArc(aid){
	var qstr=getCheckboxItem();
	if(aid==0) aid = getOneItem();
	location="archives.asp?aid="+aid+"&action=delArchives&qstr="+qstr+"";
}

//获得选中文件的文件名
function getCheckboxItem()
{
	var allSel="";
	if(document.form2.id.value) return document.form2.id.value;
	for(i=0;i<document.form2.id.length;i++)
	{
		if(document.form2.id[i].checked)
		{
			if(allSel=="")
				allSel=document.form2.id[i].value;
			else
				allSel=allSel+"`"+document.form2.id[i].value;
		}
	}
	return allSel;
}

//获得选中其中一个的id
function getOneItem()
{
	var allSel="";
	if(document.form2.id.value) return document.form2.id.value;
	for(i=0;i<document.form2.id.length;i++)
	{
		if(document.form2.id[i].checked)
		{
				allSel = document.form2.id[i].value;
				break;
		}
	}
	return allSel;
}
function selAll()
{
	for(i=0;i<document.form2.id.length;i++)
	{
		if(!document.form2.id[i].checked)
		{
			document.form2.id[i].checked=true;
		}
	}
}
function noSelAll()
{
	for(i=0;i<document.form2.id.length;i++)
	{
		if(document.form2.id[i].checked)
		{
			document.form2.id[i].checked=false;
		}
	}
}
</script>
</head>
<body leftmargin="8" topmargin="8"
	background='__PUBLIC__/skin/images/allbg.gif'>

<!--  快速转换位置按钮  -->
<table width="98%" border="0" cellpadding="0" cellspacing="1"
	bgcolor="#D1DDAA" align="center">
	<tr>
		<td height="26" background="__PUBLIC__/skin/images/newlinebg3.gif">
		<table width="98%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td align="center"><strong>添加分类操作</strong></td>
			</tr>
		</table>
		</td>
	</tr>
</table>

<form name="form2" action="{:U('logo',array('id'=>$li['id']))}" method="post" enctype="multipart/form-data">

  <table width="98%" border="0" align="center" bgcolor="#D1DDAA">
   <tr>

      <td width="100" height="28" bgcolor="#FFFFFF">&nbsp;首页广告图片:</td>

      <td bgcolor="#FFFFFF"><img src="{$li['content']}" width="200" height="40" />&nbsp;&nbsp; <input type="file" name="content" id="content" /></td>

    </tr>
    <tr>

      <td height="28" bgcolor="#FFFFFF">&nbsp;</td>

      <td bgcolor="#FFFFFF"><input type="submit" name="tijiao" value="确认"></td>

    </tr>


  </table>

</form>

<!--  内容列表   -->
<form name="form2" action="{:U('edit1',array('id'=>$li['id']))}" method="post" enctype="multipart/form-data">
<table width="98%" border="0" align="center" cellspacing="1"
	bgcolor="#D1DDAA">
	<tr>
		<td width="100" height="28" bgcolor="#FFFFFF">&nbsp;广告位置名：</td>
		<td bgcolor="#FFFFFF">{$li['type']}</td>
	</tr>

	<script type="text/javascript">
       function gradChange(){
        var objS = document.getElementById("type");
        var grade = objS.options[objS.selectedIndex].value;
      //  alert(grade);
       }
</script>

	<tr>

      <td  height="25" bgcolor="#FFFFFF">&nbsp;首页广告图片:</td>

      <td bgcolor="#FFFFFF"><input name="content" value="{$li['content']}" type="text" style="height:20px; width:200px;"> 图片宽度：<input name="width" value="{$li['width']}" type="text" style="height:20px; width:80px;">  图片高度：<input name="height" value="{$li['height']}" type="text" style="height:20px; width:80px;">(单位：px，最大宽度为：978px)</td>

    </tr>
    
  <tr>
    <td height="25" bgcolor="#FFFFFF">&nbsp;链接地址：</td>
    <td bgcolor="#FFFFFF">http://<input name="url" type="text" id="path"  style="height:25px; width:200px;" value="{$li['url']}"> </td>
  </tr>

	<tr>
		<td height="25" bgcolor="#FFFFFF">&nbsp;备注内容：</td>
		<td bgcolor="#FFFFFF"><input name="remark" type="text" id="path"
			style="height: 25px; width: 200px;" value="{$li['remark']}"></td>
	</tr>
        <tr>
    <td height="25" bgcolor="#FFFFFF">&nbsp;到期时间：</td>
    <td bgcolor="#FFFFFF"><input name="endtime" type="text" id="path"  style="height:25px; width:200px;" value="{$li['endtime']|date='Y-m-d',###}">
    （格式 2018-1-15） </td>
  </tr>
<!-- 
	<tr>
		<td height="25" bgcolor="#FFFFFF">&nbsp;广告内容：</td>
		<td bgcolor="#FFFFFF"><textarea name="content" id="content"
			style="height: 200px; width: 600px;">{$li['content']}</textarea></td>
	</tr>
 -->
	<tr>
		<td height="25" bgcolor="#FFFFFF">&nbsp;</td>
		<td bgcolor="#FFFFFF"><input type="submit" name="submit"
			value="提交"></td>
	</tr>

</table>
</form>
</body>
</html>